package cn.lbf.stuniversity.equipment.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "stdx_equipment")
public class Equipment {

    @Id
    @Column(name = "equipment_id")
    @JsonProperty("equipmentId")
    private String equipmentId;

    @Column(name = "equipment_basic_id")
    @JsonProperty("equipmentBasicId")
    private String equipmentBasicId;

    @Column(name = "equipment_model")
    @JsonProperty("equipmentModel")
    private String equipmentModel;

    @Column(name = "equipment_specification")
    @JsonProperty("equipmentSpecification")
    private String equipmentSpecification;

    @Column(name = "purchase_date")
    @JsonProperty("purchaseDate")
    @Temporal(TemporalType.DATE)
    private Date purchaseDate;

    @Column(name = "storage_location")
    @JsonProperty("storageLocation")
    private String storageLocation;

    @Column(name = "equipment_parameters")
    @JsonProperty("equipmentParameters")
    private String equipmentParameters;

    @Column(name = "equipment_price")
    @JsonProperty("equipmentPrice")
    private Double equipmentPrice;

    @Column(name = "creator_id")
    @JsonProperty("creatorId")
    private String creatorId;

    @Column(name = "create_time")
    @JsonProperty("createTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    @Column(name = "last_modifier_id")
    @JsonProperty("lastModifierId")
    private String lastModifierId;

    @Column(name = "last_modify_time")
    @JsonProperty("lastModifyTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastModifyTime;

    @Column(name = "deleter_id")
    @JsonProperty("deleterId")
    private String deleterId;

    @Column(name = "delete_time")
    @JsonProperty("deleteTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deleteTime;

    @Column(name = "sort_index")
    @JsonProperty("sortIndex")
    private Integer sortIndex;

    @Column(name = "status_flag")
    @JsonProperty("statusFlag")
    private Integer statusFlag;

}